package com.zxy.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zxy.dto.DormitoryInfo;
import com.zxy.entity.Dormitory;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Zxy
 * @since 2021-05-11
 */
public interface DormitoryMapper extends BaseMapper<Dormitory> {

    /**
     * 统计宿舍人数
     * @param id 宿舍id
     * @return int
     */
    int countByIdInt(Integer id);

    /**
     * 查询全部宿舍信息
     * @return The {@link DormitoryInfo}
     */
    IPage<DormitoryInfo> findList(Page<DormitoryInfo> page);
}
